import request from '@/utils/request';

// 密码登录
export const passwordLogin = (data) => {
  return request({
    url: '/passwordLogin',
    method: 'POST',
    data
  });
};

// 验证码登录
export const codeLogin = (data) => {
  return request({
    url: '/captchaLogin',
    method: 'POST',
    data
  });
};

// 获取验证码
export const sendCode = (email) => {
  return request({
    url: '/sendCode',
    method: 'POST',
    data: { email }
  });
};

//微信登录
export const sendWechatLogin = (data) => {
  return request({
    url: '/wechatLogin',
    method: 'POST',
    data
  });
};